fix(cli): exit non-zero when a resumed task does not complete (#1005 follow-up) - #1021
Merged
Conversation
…follow-up) Post-merge review finding on #1020. `cf work resume` printed "Task execution failed" and exited 0, so `cf work resume <id> && next_step` proceeded as if the run had succeeded. `work start` exits 1 for anything short of COMPLETED. Matched to start exactly — BLOCKED and FAILED both exit 1. The reviewer suggested FAILED only, on the grounds that blocking again is a normal outcome of a resume; that is true, but it is equally true of `work start`, and one predictable rule across both commands beats two that differ by a case. Parametrized test pins all three outcomes.
Contributor
|
Claude finished @frankbria's task in 3m 32s —— View job Precision bug review — completeHunted for concrete defects only (logic errors, null/error paths, security, data loss, race conditions, breaking changes, resource leaks).
✅ No concrete defects found. Verdict + reasoning posted as a summary comment below. Scope note: the BLOCKED→exit-1 design choice (vs. FAILED-only) is a deliberate parity decision with |
Contributor
|
✅ GLM precision review: no defects found. Reviewed the production hunk in
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Post-merge review finding on #1020.
cf work resumeprinted "Task execution failed" and exited 0, socf work resume <id> && next_stepproceeded as if the run had succeeded.work startexits 1 for anything short of COMPLETED (app.py:2610), and #1020's body promised parity with it.Matched to
work startexactly — BLOCKED and FAILED both exit 1. The reviewer suggested gating on FAILED alone, on the grounds that blocking again is a normal outcome of a resume. That is true, but it is equally true ofwork start, which exits 1 anyway; one predictable rule across both commands beats two that differ by a case.Parametrized test pins all three outcomes (COMPLETED→0, FAILED→1, BLOCKED→1).
tests/ui/test_resume_starts_worker_1005.py: 13 passed,ruffclean.